package routes

import (
	"toolsweb-admin/handlers"

	"github.com/gin-gonic/gin"
)

func RegisterProductRoutes(router *gin.Engine) {
	productGroup := router.Group("/api/admin/products")
	{
		productGroup.GET("", handlers.ListProducts)
		productGroup.POST("", handlers.CreateProduct)
		productGroup.PUT("/:id", handlers.UpdateProduct)
		productGroup.DELETE("/:id", handlers.DeleteProduct)
		productGroup.PUT("/:id/publish", handlers.ToggleProductPublish)
	}
}
